set(srcs "${CMAKE_CURRENT_SOURCE_DIR}/model_tools.cpp;${CMAKE_CURRENT_SOURCE_DIR}/model_deserialize.cpp")

if(BUILD_TEST OR USE_CAFFE OR USE_ONNX OR USE_TFLITE)
    set(srcs "${srcs};${CMAKE_CURRENT_SOURCE_DIR}/data_type_converter.cpp;${CMAKE_CURRENT_SOURCE_DIR}/model_serialize.cpp;${CMAKE_CURRENT_SOURCE_DIR}/model_print.cpp")
endif(BUILD_TEST OR USE_CAFFE OR USE_ONNX OR USE_TFLITE)

# shared library 
ADD_LIBRARY(${PROJECT_NAME} SHARED ${srcs})

# static library 
ADD_LIBRARY(${PROJECT_NAME}_static STATIC ${srcs})

SET_TARGET_PROPERTIES(${PROJECT_NAME}_static PROPERTIES OUTPUT_NAME "${PROJECT_NAME}") 
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES CLEAN_DIRECT_OUTPUT 1) 
SET_TARGET_PROPERTIES(${PROJECT_NAME}_static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
